import config from '@/config'

const useSettingsStore = defineStore(
  'settings',{
    state: () => ({
      title: config.title,
      category:[],
    }),
    actions: {
      changeSetting(data) {
        const { key, value } = data
        if (this.hasOwnProperty(key)) {
          this[key] = value
        }
      },
      changeCategory(data) {
        this.category = data
      }
    }
  }
)

export default useSettingsStore